<div id="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-everything">
    <script>
            $(".sameFencer").css("background-color", "black");
    function newAjax()
    {
        $.ajax({
            url: "/bouting/{{tournament.id}}/{{event.id}}/{{round.id}}/deView/",
            dataType : "text",
            success: function(data) {
                $("#{{tournament.id}}-{{event.id}}-{{round.roundNum}}-everything").html(data);
            },
            error: function(data, c, u) {
                //alert(c);
                //$("#everything").html(data);
            }
});
    }
    
    $("#{{tournament.id}}-{{event.id}}-{{round.roundNum}}-myForm").submit(function() {
    //xhr.setRequestHeader('X-CSRF-Token', csrf_token);
    //var data = {'csrfmiddlewaretoken': '{{ csrf_token }}'};
    var data = $('#{{tournament.id}}-{{event.id}}-{{round.roundNum}}-myForm').serialize();
    $.post("/bouting/{{tournament.id}}/{{event.id}}/{{round.id}}/editBout/", data); // do the necessary post here
    newAjax();
    return false; // Do not submit the form
});
    
var csrf_token = '<%= token_value %>';
    </script>
    {% autoescape off %}
        {{round.printTable}}
    {% endautoescape %}

    <style>

  .bracket { float: left; }
</style>
{% if canEdit %}
<fieldset style="width:10px;">
    <legend>Enter Scores</legend>
    <form id="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-myForm" action="/bouting/{{tournament.id}}/{{event.id}}/{{round.id}}/editBout/" method="post">
    {% csrf_token %}
    
    <select name="bout" id="bout">    
        {% for bout in round.getBouts%}
            <option value='{{bout.id}}'>
            {%if bout.finished%}
                <del>
            {%endif%}
            {{bout.leftFencer}}-{{bout.rightFencer}}
            {%if bout.finished%}
                </del>
            {%endif%}
            </option>
        {% endfor %}
    </select>
    <input name="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-leftScore" id="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-leftScore" type="text" size="1"></input>
    -
    <input name="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-rightScore" id="{{tournament.id}}-{{event.id}}-{{round.roundNum}}-rightScore" type="text" size="1"></input>
    <input name="done" id="done" type="checkbox" checked="checked"></input>Completed?
    <input type="submit" value="Enter"></input>
    
    <form>
</fieldset>
{% endif %}
<button type="button" onclick=newAjax() value="bleh">Do Cool Shit</button>
</div>